{% extends 'base.html' %} {% block css%}
<style type="text/css">
    .b1 {
        color: blue;
    }
</style>
{% endblock %} {% block body%}
<div class="row">

    <div class="col-md-12">
        <h4>            
            <span class="pull-right">
                
                <span style="color: blue; background-color: yellow; font-size: 16px; font-weight: bolder;" id="send_all_area_data_hint">请稍候, 正在生成数据... </span>
                &nbsp;&nbsp;
                <i style="color:#0051f3" class="glyphicon glyphicon-stats"></i>
                <a href="/history_chart">图表</a>
                &nbsp;&nbsp;
                <i style="color:#0051f3" class="glyphicon glyphicon-refresh"></i>
                <a href="/send_all_area_data" id="send_all_area_data">生成数据</a>
                &nbsp;&nbsp;
                <i style="color:#0051f3" class="glyphicon glyphicon-download-alt"></i>
                <a href="./static/files/history.xlsx">下载数据</a>
                <!-- <a href="./static/files/history.csv">下载历史数据</a> -->
            </span>
        </h4>
        <table class="table table-hover table-responsive">
            <!-- <tr>
                <th>时间</th>
                <th>CH1温度</th>
                <th>CH1湿度</th>
                <th>CH2温度</th>
                <th>CH2湿度</th>
                <th>CH3温度</th>
                <th>CH3湿度</th>
                <th>CH4温度</th>
                <th>CH4湿度</th>      
            </tr> -->

            {% for row_data in data %}
            <tr>
                <td width="20%">
                  {{ row_data[0] }}
                </td>

                <!-- ch1 -->
                <td>
                    {{ row_data[1] }}
                </td>
                <td>
                    {{ row_data[2] }}
                </td>
                <!-- ch2 -->
                <td>
                    {{ row_data[3] }}
                </td>
                <td>
                    {{ row_data[4] }}
                </td>                
                <!-- ch3 -->
                <td>
                    {{ row_data[5] }}
                </td>
                <td>
                    {{ row_data[6] }}
                </td>                
                <!-- ch4 -->
                <td>
                    {{ row_data[7] }}
                </td>
                <td>
                    {{ row_data[8] }}
                </td>
            </tr>
          {% endfor %}

        </table>

        <nav aria-label="Page navigation" class="pull-right">
            <ul class="pagination">
                {{ html|safe }}
            </ul>
        </nav>        
    </div>

</div>

{% endblock %} {% block js%}
{{ super() }}
<script type="text/javascript">

$(document).ready(function() {
    $("#send_all_area_data_hint").hide();


    $("#send_all_area_data").click(function() {
         $("#send_all_area_data_hint").show();
    });
});
</script>
{% endblock %}